package org.test.testapi.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author xlang
 * @version 0.0.1
 * @desciption
 * @date 2020/9/5 12:29
 */
@Data
public class Person {


    private Integer id;

    private String name;

    @Pattern(regexp="^(?=.*[a-zA-Z])(?=.*\\d)[\\s\\S]{6,20}$", message = "{LoginByEmail.password.Pattern}")
    private String password;

    @NotBlank(message = "{LoginByPhone.phone.null}")
    private String phone;

}
